import weexRequest from "weex-request";

// 设置默认选项
weexRequest.default.baseUrl = "http://localhost:3000/";
weexRequest.default.headers = {
    "Content-Type": "application/x-www-form-urlencoded"
};
// 拦截请求
weexRequest.interceptors.request = function(config) {
    console.log("config", config);
    return Promise.resolve(config);
};

// 拦截响应
weexRequest.interceptors.response = function(response) {
    console.log("response", response);
    return Promise.resolve(response);
};

export default weexRequest;
